<?php
    $form['target']   = 'auth/check_login';
    $form['username'] = array(
                    'name'          => 'username',
                    'id'            => 'username',
                    'type'          => 'text',
                    'autofocus'     => 'autofocus',
                    'placeholder'   => 'hans',
                    'value'         => set_value('username'),
                    'maxlength'     => 80,
                    'size'          => 30,
                    'required'      => 'required',
                    );
    $form['password'] = array(
                    'name'          => 'password',
                    'type'          => 'password',
                    'id'            => 'password',
                    'placeholder'   => '3sel4n7on',
                    'value'         => set_value('password'),
                    'maxlength'     => 80,
                    'size'          => 30,
                    'required'      => 'required',
                    );	
    $form['submit']  = array(
                    'name'  => 'login',
                    'class' => 'btn login',
                    'type'  => 'submit',
                    'value' => 'Let me in',
                    );	
    $form['remember'] = array(
                    'name'      => 'remember',
                    'id'        => 'remember',
                    'value'     => 1,
                    'checked'   => set_value('remember'),
                    'style'     => 'margin:0;padding:0',
                    );
?>

<div id="login">
    <?php if(isset($notification) && !empty($notification)) 
            echo '<span class="' . $notification['type'] . '">' . $notification['message'] . '</span>'; 
    ?>
    <?php echo form_open($form['target']); ?>
    <table class="center-table">
        <tr>
            <td><?php echo form_label($form['username']['name'], $form['username']['id']); ?></td>
            <td><?php echo form_input($form['username']); ?></td>
            <td style="color: red;"><?php echo form_error($form['username']['name']); ?></td>
        </tr>
        <tr>
            <td><?php echo form_label($form['password']['name'], $form['password']['id']); ?></td>
            <td><?php echo form_password($form['password']); ?></td>
            <td style="color: red;"><?php echo form_error($form['password']['name']); ?></td>
        </tr>
        <tr>
            <td colspan="3">
                <?php echo form_checkbox($form['remember']); ?>
                <?php echo form_label('Remember me', $form['remember']['id']); ?>
                <?php echo anchor('/auth/forgot_password/', 'Forgot password'); ?>
                <?php if ($this->config->item('allow_registration', 'tank_auth')) echo anchor('/auth/register/', 'Register'); ?>
            </td>
        </tr>
    </table>
    <br>
    <?php echo form_submit($form['submit']); ?>
    <?php echo form_close(); ?>
</div>